import { ref } from 'vue'

export function alertListAction(name: string) {
  const isComponent = ref()
  const policyId = ref()
  const handleAlert = (id: number) => {
    isComponent.value = name
    policyId.value = id
  }
  const handleClose = () => {
    isComponent.value = ''
  }
  return {
    isComponent,
    policyId,
    handleAlert,
    handleClose
  }
}
